﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="QuanLyXetCong.aspx.cs" Inherits="ChamCong.Admin.QuanLyXetCong" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        div.childMenu
        {
            padding-bottom: 10px;
        }
        
        div.childMenu ul
        {
            list-style: none;
            margin: 0px;
            padding: 0px;
            width: auto;
        }
        
        div.childMenu ul li
        {
            padding-right: 5px;
        }
        
        div.childMenu ul li a
        {
            background-color: #D4D4D4;
            color: #525252;
            display: block;
            line-height: 1.35em;
            padding: 4px 10px;
            text-decoration: none;
            white-space: nowrap;
        }
        
        div.childMenu ul li a:hover
        {
            background-color: #3399FF;
            color: #FFF;
            text-decoration: none;
        }
        
        div.childMenu ul li a:active
        {
            background-color: #3399FF;
            color: #cfdbe6;
            text-decoration: none;
        }
        
        div.childMenu ul li a:visited
        {
            font-weight: bold;
        }
        div.childMenu ul li a.current
        {
            background-color: #3399FF;
            color: #FFF;
        }
        .style2
        {
            width: 150px;
            font-weight: bold;
            font-family: Tahoma;
            font-size: 13px;
        }
    </style>
    <script type="text/javascript">
        function checkEmpty() {
            var btn = document.getElementById('txtChuThich').value;
            if (btn == "") {
                alert('Vui lòng để lại phản hồi khi từ chối.');
                setTimeout(function () { document.getElementById('txtChuThich').focus(); ; }, 1);
                return false;
            }
            else {
                return true;
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" CssClass="childMenu" 
            SkipLinkText="">
            <Items>
                <asp:MenuItem Text="Yêu cầu chờ duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyXetCong.aspx?ttd=0">
                </asp:MenuItem>
                <asp:MenuItem Text="Yêu cầu đã duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyXetCong.aspx?ttd=1">
                </asp:MenuItem>
                <asp:MenuItem Text="Yêu cầu không duyệt" Value="" NavigateUrl="~/LanhDao/QuanLyXetCong.aspx?ttd=2">
                </asp:MenuItem>
            </Items>
        </asp:Menu>
        <sbc:sbcMsgBox ID="sbcMsgBox1" runat="server" UseJQuery="True" />
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="width: 500px; float: left;">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="float: left">
                    <asp:GridView ID="dgvXetCong0" runat="server" AutoGenerateColumns="False" OnRowDataBound="dgvXetCong0_RowDataBound"
                        CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" 
                        PageSize="10" onpageindexchanging="dgvXetCong0_PageIndexChanging">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="Ma" HeaderText="Mã" />
                            <asp:BoundField DataField="Ngay" HeaderText="Ngày" DataFormatString="{0:dd/MM/yyyy}" >
                            </asp:BoundField>
                            <asp:BoundField DataField="MaNV" HeaderText="Mã NV" >
                            </asp:BoundField>
                            <asp:BoundField DataField="HoTen" HeaderText="Họ Tên" >
                            </asp:BoundField>
                            <asp:BoundField DataField="MaLoaiCong" HeaderText="Loại Công" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="GioTangCa" HeaderText="Tăng Ca" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="imgbtXem0" ImageUrl="~/Scripts/Image/Xem.jpg" Width="18px" Height="18px"
                                        runat="server" OnClick="imgbtXem0_Click" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="pager" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <SortedAscendingCellStyle BackColor="#FDF5AC" />
                        <SortedAscendingHeaderStyle BackColor="#4D0000" />
                        <SortedDescendingCellStyle BackColor="#FCF6C0" />
                        <SortedDescendingHeaderStyle BackColor="#820000" />
                    </asp:GridView>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div style="width: 400px; float: right; padding-left: 0px;">
        <asp:UpdatePanel ID="UpdateXetCong" runat="server">
            <ContentTemplate>
                <table id="tbShow" cellpadding="2" runat="server" style="width: 200px; background-color:White;">
                    <tr>
                        <td class="style2">
                            Mã NV :
                        </td>
                        <td>
                            <asp:Label ID="lbMaNV" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Họ Tên :
                        </td>
                        <td>
                            <asp:Label ID="lbHoTen" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Ngày :
                        </td>
                        <td>
                            <asp:Label ID="lbNgay" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Đến:
                            <asp:Label ID="lbGioDen" runat="server"></asp:Label>
                        </td>
                        <td class="style2">
                            Về:
                            <asp:Label ID="lbGioVe" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Mã Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbMaCong" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbSoCong" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Giờ Tăng Ca:
                        </td>
                        <td>
                            <asp:Label ID="lbGioTangCa" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            Xin Xét Lại:
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Mã Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbMaCong2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Giờ Tăng Ca:
                        </td>
                        <td>
                            <asp:Label ID="lbGioTangCa2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Hệ Số Tăng Ca :
                        </td>
                        <td>
                            <asp:Label ID="lbHeSo2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" colspan="2">
                            Lý Do :
                            <asp:TextBox ID="txtLyDo" runat="server" Height="40px" TextMode="MultiLine" Width="285px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Button ID="btnChapNhan" runat="server" Text="Chấp Nhận" OnClick="btnChapNhan_Click"
                                CssClass="button" />
                            <asp:Button ID="btnHuy" runat="server" Text="Từ chối" OnClientClick="return checkEmpty();"
                                OnClick="btnHuy_Click" CssClass="button" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" colspan="2">
                            Phản hồi:
                            <asp:TextBox ID="txtChuThich" runat="server" Height="40px" TextMode="MultiLine" Width="285px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
